#include "PrecompiledHeader_FileSysMgr.h"
#include "FileDesc.h"

/*--------------------------------------------------------------------------*/

FileDesc::FileDesc(const std::string& path, DataSource* datasource)
{
	this->m_ext = ::GetFileExt(path);
	this->m_dir = ::GetFilePath(path);
	this->m_name = ::GetFileName(path);
	this->m_fullname = ::GetFileFullname(path);
	this->m_path = path;

	this->m_datasource = datasource;
}

/*--------------------------------------------------------------------------*/

FileDesc::~FileDesc()
{
	
}

/*--------------------------------------------------------------------------*/

const std::string& FileDesc::GetExtension() const
{
	return this->m_ext;
}

/*--------------------------------------------------------------------------*/

const std::string& FileDesc::GetDir() const
{
	return this->m_dir;
}

/*--------------------------------------------------------------------------*/

const std::string& FileDesc::GetName() const
{
	return this->m_name;
}

/*--------------------------------------------------------------------------*/

const std::string& FileDesc::GetFullname() const
{
	return this->m_fullname;
}

/*--------------------------------------------------------------------------*/

const std::string& FileDesc::GetPath() const
{
	return this->m_path;
}

/*--------------------------------------------------------------------------*/

DataSource* FileDesc::GetOwner()
{
	return this->m_datasource;
}

/*--------------------------------------------------------------------------*/
